<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>侧轴元素排列方式(单行)</title>
    <style>
      .container {
        display: flex;

        /*
          元素侧轴排列方式
          stretch             默认值, 侧轴拉伸排列
          注意: 如果弹性项目设定了高度,则会以高度为准,拉伸效果失效

          flex-start          侧轴从头开始排列
          flex-end            侧轴从尾开始排列
          center              侧轴居中
        */
        /* align-items: flex-end; */

        width: 700px;
        height: 400px;
        background-color: #ccc;
      }

      .item1 {
        width: 150px;
        /* height: 150px; */
        background-color: palegreen;
      }

      .item2 {
        width: 150px;
        /* height: 150px; */
        background-color: paleturquoise;
      }

      .item3 {
        width: 150px;
        /* height: 150px; */
        background-color: pink;
      }

      .item4 {
        width: 150px;
        /* height: 150px; */
        background-color: peachpuff;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="item1">11111111111</div>
      <div class="item2">22222222222</div>
      <div class="item3">33333333333</div>
      <div class="item4">44444444444</div>
    </div>
  </body>
</html>
